package com.wasion.gydpe.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.wasion.gydpe.dao.ResourceDao;
import com.wasion.gydpe.exception.DataAccessException;
import com.wasion.gydpe.model.Resource;

/**
 * 
 * @ClassName: ResourceDaoImpl
 * @Description: 资源（权限）数据访问层实现DaoImpl
 * @author 高意
 * @date Sep 25, 2012 8:41:13 AM
 * 
 */
@Repository
public class ResourceDaoImpl extends GenericMybatisDaoImpl<Resource, Long>
		implements ResourceDao {

	public ResourceDaoImpl() {
		this.sqlmapNamespace = "resource";
	}

	public List<Resource> queryDistributeds(Map<String, Object> paramMap)
			throws DataAccessException {

		return this.session.selectList("resource.queryDistributeds", paramMap);
	}

	public List<String> queryTopDistributeds(Map<String, Object> paramMap)
			throws DataAccessException {

		return this.session.selectList("resource.queryTopDistributeds",
				paramMap);
	}

	public List<String> queryTopUndistributeds(Map<String, Object> paramMap)
			throws DataAccessException {

		return this.session.selectList("resource.queryTopUndistributeds",
				paramMap);
	}

	public List<Resource> queryUndistributeds(Map<String, Object> paramMap)
			throws DataAccessException {

		return this.session
				.selectList("resource.queryUndistributeds", paramMap);
	}

}
